home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!xmission!news
- From: tknarr@xmission.com ( Todd Knarr )
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Date: 21 Jan 1996 18:08:27 GMT
- Organization: Chaos Central
- Message-ID: <4dtver$hf4@news.xmission.com>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd <4cf8hf$8fe@hopi.gate.net> <4cgq30$c0v@weck.brokersys.com> <4cvu68$2jb@macaw.cyberport.com> <4d21og$iab@news.xmission.com> <4djm1o$kf3@gaia.ns.utk.edu>
- Reply-To: tknarr@xmission.com ( Todd Knarr )
- NNTP-Posting-Host: slc65.xmission.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4djm1o$kf3@gaia.ns.utk.edu>, mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel) writes:
- >Indeed I agree. I find that I do not always enjoy even having to manifestly
- >declare types for variables everywhere. I like static type inference as in
- >Eiffel and Sather (and others), where the static type of a variable is
- >derived from the types of other parts of the system.
-
- I'm not sure that's neccesarily good either. If you do pure inference, you
- can end up with code that doesn't compile or doesn't work right and the
- error messages are far removed from the actual cause. By declaring the type
- explicitly, I'm declaring to the world what the code that uses that variable
- is willing to put up with in terms of semantics. By declaring the appropriate
- constructors and conversion member functions in my own classes, I provide
- or do not provide a map of what can be treated as what and what can't. If I
- do make a change somewhere that results in handing code a variable with
- semantics different from what it's prepared to handle, I get my error
- messages at exactly the point I handed it the variable. At that point I
- check to see whether I made a mistake and am passing in something wrong,
- or whether I need to rewrite the code to handle a different type. With
- inference, I get errors at use points well away from the point I probably
- need to look at.
-
- --
- Todd Knarr : tknarr@xmission.com | finger for PGP public key
- | Member, USENET Cabal
-
- Seriously, I don't want to die just yet. I don't care how
- good-looking they are, I! don't! want! to! die!"
- -- Megazone ( UF1 )
-
-